package com.yanmaohu.yulia.bean;

/**
 * @author Bright Lee
 */
public final class RelativeCategory implements OrderingCategory {

    private int beginIndex;
    private int endIndex;
    private SpecificRoutineDesignator relativeFunctionSpecification;

    public RelativeCategory(int beginIndex, SpecificRoutineDesignator relativeFunctionSpecification) {
        this.beginIndex = beginIndex;
        this.endIndex = relativeFunctionSpecification.getEndIndex();
        this.relativeFunctionSpecification = relativeFunctionSpecification;
    }

    @Override
    public int getBeginIndex() {
        return beginIndex;
    }

    @Override
    public int getEndIndex() {
        return endIndex;
    }

    public SpecificRoutineDesignator getRelativeFunctionSpecification() {
        return relativeFunctionSpecification;
    }

}
